package workflow

var (
	_ Flow = NewNopeFlow()
)

type NopeFlow struct {
	name string
}

func (f *NopeFlow) GetName() string {
	return f.name
}

func (f *NopeFlow) Run(trigger FlowTrigger, data Map) error {
	trigger.Next()
	return nil
}

func (f *NopeFlow) Rollback(trigger FlowRollback, data Map) error {
	trigger.Rollback()
	return nil
}

func (f *NopeFlow) Skip(data Map) bool {
	return false
}

func NewNopeFlow() *NopeFlow {
	return &NopeFlow{
		name: "nope",
	}
}
